package him.serviceimple;

import java.util.List;

import him.dao.CourseDAO;
import him.dto.coursemanage.CourseDTO;
import him.dto.coursemanage.CoursestuDTO;
import him.service.CourseService;

public class CourseServiceImple implements CourseService {
	private CourseDAO courseDAO;
	private static CourseServiceImple courseService;
	
	public static CourseServiceImple getInstance(){
		if (courseService==null) {
			courseService = new CourseServiceImple();
		}
		return courseService;
	}
	@Override
	public boolean deleteCourse(String course_code) {
		return courseDAO.deleteCourse(course_code);
	}

	@Override
	public List<CourseDTO> getAllCourseList() {
		return courseDAO.getAllCourseList();
	}

	@Override
	public CourseDTO getCourseDetail(CourseDTO dto) {
		return courseDAO.getCourseDetail(dto);
	}

	@Override
	public boolean insertCourse(CourseDTO dto) {
		return courseDAO.insertCourse(dto);
	}

	@Override
	public boolean updateCourse(CourseDTO dto) {
		return courseDAO.updateCourse(dto);
	}
	@Override
	public List<CourseDTO> getIngCourseList() {
		return courseDAO.getIngCourseList();
	}
}
